<?php
include_once "xAP-functions/webincludes.php";

if (intval($_POST["id"])>0){
	$sql="update xAP_Event set
	Alias='".dbesc($_POST["name"])."', ";
	if($_POST["active"]==1){
	$sql.=" Active=1, ";
	}else{
	$sql.=" Active=0, ";
	}
	if($_POST["bscactive"]==1){
	$sql.=" BSC=1 ";
	}else{
	$sql.=" BSC=0 ";
	}
	$sql.=" where EventId=".intval($_POST["id"]);
	dbexec($sql);
	echo "Saved";
	
}else{
	echo "Error";
}

?>